﻿ @using UcAsp.Net.Model;
@using UcAsp.Net.BLL;
@using UcAsp.Net.Comm
@{
    Layout = "~/themes/bootstrap/Shared/_Layout.cshtml";
}
@model UcAsp.Net.Model.ArticelsViews
 
@{
    ViewBag.Title = Model.Title;
}

<h2>@Model.Title</h2>
@(new HtmlString(Model.ArticleContent))


@for (int i = 1; i < int.Parse(@ViewData["Count"].ToString())+1; i++)
{
    if (i == 1) {
     <a href="/ShowMessage/@(Model.ID).shtml">@i</a>
    }
    else
    {
    <a href="/ShowMessage/@(Model.ID)_@(i).shtml">@i</a>
    }
}
    <div class="container-fluid">
        <div class="span8">
            @{
                foreach (UcAsp.Net.Model.Subjects model in UcAsp.Net.BLL.SubjectsConfig.GetMessageSubjects(Model.CategorieID))
                {
                    
                <div class="span6" style="float: left; margin: 0px; padding: 0px;">
                <div> @SubjectsConfig.GetMessageSubjects(model.SubjectId,Model.CategorieID).SubjectName</div>
                    @foreach (ArticelsViews art in ArticlesBLL.GetMessageSubject(model.SubjectId, Model.CategorieID))
                    {
                        <a href="/ShowMessage/@if (string.IsNullOrEmpty(art.ShowPath))
                                              {@art.ID<text>.shtml</text>}
                                              else
                                              {@art.ShowPath<text>.shtml</text>}">
                            @(UcAsp.Net.Comm.Utils.ClearPart(art.Title, 20))
                        </a>
                    }
                </div>
                }
            }
        </div>
        <div class="span4">
            @(new HtmlString(AdvConfig.GetAdvPositions("AD4").AdvHtml))
        </div>
    </div>
</div>
